<template>
  <div class="App">
    <div class="box" @click="fn"></div>
  </div>
</template>

<script>
export default {
  methods: {
    fn() {
      alert("你好")
    }
  }
}
</script>

<style lang="less">
/* 
让style支持less
 1 给style加上 lang="less"
 2 安装依赖包 less less-loader
   yarn add less less-loader -D //-D(开发依赖)
*/
.App {
  width: 400px;
  height: 400px;
  background-color: pink;

  .box {
    width: 100px;
    height: 100px;
    background-color: skyblue;
  }
}
</style>
